﻿<Page x:Class="BookvarWpf.Presentation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:aw="clr-namespace:Assergs.Windows;assembly=Assergs.Windows"
    xmlns:r="clr-namespace:Bookvar.UI.Localization;assembly=Bookvar.UI"
	xmlns:ui="clr-namespace:Bookvar.UI;assembly=Bookvar.UI"
	xmlns:commands="clr-namespace:Bookvar.UI.Commands;assembly=Bookvar.UI"
	xmlns:converters="clr-namespace:Bookvar.UI.Converters;assembly=Bookvar.UI"
	xmlns:local="clr-namespace:BookvarWpf"
    Title="Presentation"
    >

	<Page.Resources>
		<local:TopicTemplateSelector x:Key="topicTemplateSelector" />
		<converters:DoubleToPercentageConverter x:Key="doubleToPercentageConverter" />
	</Page.Resources>

	<DockPanel>
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition />
				<RowDefinition Height="26"/>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<Grid.Background>
				<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
					<GradientStop Offset="0" Color="#9EBEE7" />
					<GradientStop Offset="0.7" Color="#567DB1" />
					<GradientStop Offset="1" Color="#6591CD" />
				</LinearGradientBrush>
			</Grid.Background>
			<Path Fill="#FF97B6DC" Stretch="Fill" Stroke="#FFAEC7E8" Width="505" Data="M0.5,0.5L480.5,0.5C362.06667,12.09897,210.5,53.233083,0.5,169.5z" StrokeThickness="1.5" HorizontalAlignment="Left" VerticalAlignment="Top" Height="159" />
			<Path Fill="#FFAEC7E8" Stretch="Fill" HorizontalAlignment="Left" Width="505" Data="M0.5,0.5L480.5,0.5C362.06667,12.09897,210.5,53.233083,0.5,169.5z" VerticalAlignment="Top" Height="134" />

			<ScrollViewer Grid.Row="0" Grid.Column="0" x:Name="scrollViewer" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" FocusVisualStyle="{x:Null}" Style="{DynamicResource SimpleScrollViewer}" >
				<ui:MindMapPanel x:Name="mindMap" Width="2000" Height="2000" TopicTemplate="{DynamicResource topicTemplate}" TopicTemplateSelector="{StaticResource topicTemplateSelector}">
				</ui:MindMapPanel>
			</ScrollViewer>
			<aw:ToolWindowDockPanel>
			</aw:ToolWindowDockPanel>
			<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal">
				<StackPanel Orientation="Horizontal" Margin="5,4,0,0">
					<TextBlock Text="{Binding ElementName=zoomer, Path=Value, Converter={StaticResource doubleToPercentageConverter}}" ></TextBlock>
					<Slider x:Name="zoomer" Width="150" Value="1" Maximum="6" IsMoveToPointEnabled="True" TickPlacement="BottomRight" Ticks="0.5, 1, 6"
						Minimum="0.5"/>
				</StackPanel>
				<Button
						Command="commands:BookvarUICommands.PreviousPresentationTopic"
						CommandTarget="{Binding ElementName=mindMap}" Content="{r:Resources PresentationPreviousText}" Width="60"
						Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"/>
				<Button
						Command="commands:BookvarUICommands.NextPresentationTopic"
						CommandTarget="{Binding ElementName=mindMap}" Content="{r:Resources PresentationNextText}" Width="60"
						Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"/>

				<Button
						Command="commands:BookvarUICommands.ExitPresentationMode"
						CommandTarget="{Binding ElementName=mindMap}" Content="{r:Resources PresentationExitText}" Width="60"
						Height="22" BorderBrush="#FF536B88" Background="{StaticResource BlueButtonStyleBrush}"/>
			</StackPanel>
		</Grid>

	</DockPanel>
</Page>
